<?php
/*
	[English learning assistant system]
	admin_index
*/

define('ELS_VERSION', '1.0.0');
define('IN_ELS', true);
define('USER_IN_ELS', true);
error_reporting(7);
define('ELS_ROOT', substr(__FILE__, 0, -9));
define('ELS_DATADIR', ELS_ROOT.'data/');

//email
//define('SMTPSERVER', "mail.keeplearn.com");
//define('SMTPUSERMAIL', "xujian@keeplearn.com");
//define('SMTPUSER', "xujian@keeplearn.com");
//define('SMTPPASS', "123456");

ob_start();
session_start();

$page 	=empty($_REQUEST['p']) ? 'home' : $_REQUEST['p'];
$pagearr = array(
			0 => 'home',
			1 => 'members',
			2 => 'activities',
			3 => 'register',
			4 => 'coupon',
			5 => 'user',
			6 => 'entert',
			7 => 'food',
			8 => 'news',
			9 => 'clicknum',
			10=> 'ajax',
		);

if(in_array($page,$pagearr)){
	
} else {
	Header("Location: error.php");
	exit;
}



require ELS_DATADIR.'config.inc.php';
require ELS_ROOT.'model/base.php';

require ELS_ROOT.'model/'.$page.'_model.php';
require ELS_ROOT.'control/'.$page.'_control.php';
$control=new control();
?>